<template>
    <div>
        <ul>
            <li v-for="item in goodsList" :key="item.id">
                <img :src="item.list_pic_url" alt="产品" width="100%">
                <div class=" title van-ellipsis">{{item.name}}</div>
                <div class="price">{{item.retail_price | filterMoney}}</div>
            </li>
        </ul>
    </div>
</template>

<script>
    export default {
        name: "Commodity",
        data() {
            return {
                imgSrc: require('@/assets/logo.png')
            }
        },
        props:['goodsList']

    }
</script>

<style lang="less" scoped>
    ul {
        padding: .1rem 2%;
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
        li {
            width: 49%;
            margin-bottom: .1rem;
            background: #fff;
            text-align: center;
            .title{
                padding: .3rem;
            }
            .price {
                color: darkred;
                padding: .1rem;
            }
        }
    }
</style>